<%@ page import="vendas.Pedido" %>



<div class="fieldcontain ${hasErrors(bean: pedidoInstance, field: 'cliente', 'error')} required">
	<label for="cliente">
		<g:message code="pedido.cliente.label" default="Cliente" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="cliente" name="cliente.id" from="${vendas.Cliente.list()}" optionKey="id" required="" value="${pedidoInstance?.cliente?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: pedidoInstance, field: 'data', 'error')} required">
	<label for="data">
		<g:message code="pedido.data.label" default="Data" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="data" precision="day"  value="${pedidoInstance?.data}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: pedidoInstance, field: 'items', 'error')} ">
	<label for="items">
		<g:message code="pedido.items.label" default="Items" />
		
	</label>
	<g:select name="items" from="${vendas.ItemPedido.list()}" multiple="multiple" optionKey="id" size="5" value="${pedidoInstance?.items*.id}" class="many-to-many"/>
</div>

